<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/tidy.css"/>


    <script src="__STATIC_URL__/static/laydate/laydate.js"></script>
    <script src="__STATIC_URL__/static/js/times.js"></script>


</head>
<body>
{include file='public/header'/}
<section>
    <!------------------导航-------------------------->
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ul class="breadcrumb">
                <li>当前位置是&nbsp;:</li>
                <li><a href="{:url('cardus/cardinfo',['card_id'=>$card['card_id']])}">会员卡</a></li>
                <li>&nbsp<a href="{:url('shop/shopmall',['card_id'=>$card['card_id']])}"> 积分商城</a></li>
                <li class="active" style="color: #02b87f;">类目列表</li>
            </ul>
        </div>

        <div class="panel mgl15 mgr15">

            <div class="panel-heading addCharts mgb10" style="background:#ededed;overflow: hidden">
                类目列表
                <div class=" pull-right" style="margin-top: -9px;">
                    <a href="{:url('shoptest/cateadd',['card_id'=>$card['card_id']])}" class="btn btn-info">添加类目</a>
                </div>
            </div>
            <div class="panel-body">

                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade in active" id="normal">
                        <table class="table table-bordered" data-toolbar="#normal">
                            <thead>
                            <tr>
                                <th>id</th>
                                <th>类目名称</th>
                                <th>创建时间</th>
                                <th>操作</th>

                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.name}</td>
                                <td>{$vo['create_time']}</td>
                                <td class="chakan">

                                    <a class="btn-link"
                                       href="{:url('shoptest/cateedit',array('id'=>$vo['id'],'card_id'=>$card['card_id']))}">修改</a>
                                    <a class="btn-link"
                                    href="{:url('shoptest/catedel',array('id'=>$vo['id']))}">|删除</a>

                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                    {$list->render()}
                </div>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">二维码预览</h4>
            </div>
            <div class="modal-body">
                <img src="" class="img-responsive" id="modalcode" style="margin: 0 auto;">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal">确认</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</body>
<script type="text/javascript">
    $(function () {

        $(".glyphicon-qrcode").click(function () {
            var src = $(this).attr("data-src");
            if (!!src) {
                $("#modalcode").attr("src", src);
                $("#myModal").modal("show");
            } else {
                alert("未获得二维码")
            }
        });
        $("#myModal").on("hide.bs.modal", function () {
            $("#modalcode").attr("src", "");
        })
    })
</script>
</html>
